package 
{
	import flash.display.*;
	import flash.events.*;
	
	/**
	 * ...
	 * @author hbb
	 */
	public class Main extends Sprite 
	{
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			
			
			GameManager.Singleton.init( createCanvas() );
			
			GameManager.Singleton.start();
		}
		
		private function createCanvas():Sprite
		{
			this.addChild( new Sprite() );
			return this;
		}
		
	}
	
}
/*
import flash.display.Sprite;

class PhysGround extends Sprite
{
	public function PhysGround()
	{
		graphics.clear();
		graphics.beginFill(0);
		graphics.drawRect(-50, -50, 100, 100);
		graphics.endFill();
	}
}
class PhysBox extends Sprite
{
	public function PhysBox()
	{
		graphics.clear();
		graphics.beginFill(0xff);
		graphics.drawRect(-50, -50, 100, 100);
		graphics.endFill();
	}
}
class PhysCircle extends Sprite
{
	public function PhysCircle()
	{
		graphics.clear();
		graphics.beginFill(0xff00);
		graphics.drawCircle(0, 0, 100);
		graphics.endFill();
	}
}*/